calculate_AMCEs_sims <- function(voter_weights, vote_mat){
  # creating empty vectors to store the AMCEs for each attribute
  AMCE_abortion <- NULL
  AMCE_taxes <- NULL
  
  # calculate AMCEs based on different scenarios
  for(i in 1:length(voter_weights)){
    AMCE_abortion <- c(AMCE_abortion, amce_compute_abstain(vote_mat, pos=1, value.baseline="C", value.amce="L", weights = voter_weights[[i]], idvar = "type")$amce)
    AMCE_taxes <- c(AMCE_taxes, amce_compute_abstain(vote_mat, pos=2, value.baseline="I", value.amce="D", weights = voter_weights[[i]], idvar = "type")$amce)
  }
  
  return(cbind(AMCE_abortion, AMCE_taxes))
}
